package day03;

/**
 * Created by Administrator on 2023/7/1 0001.
 */
public class ComparableDemo {
    public static void main(String[] args) {
        String a="apple";
        String b="banana";
        System.out.println(a.compareTo(b));//a<b
        Fraction fa=new Fraction(1,2);
        Fraction fb=new Fraction(2,4);
        System.out.println(fa.compareTo(fb));//0
        System.out.println(fa==fb);//false
        System.out.println(fa.equals(fb));//true
    }
}
